package com.mocha.Test;

public class Ma {
	private static String [] signs = new String[] {"F","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","AA","AB","AC","AD"};

		public static void main(String[] args) {
			StringBuffer sbf = new StringBuffer("=SUM(");
			int len = 18;
			int index=4;
			for (int i = 4; i < len; i++) {
				if (i==len-1) {
					sbf.append(signs[index-4]);
					sbf.append((i+1));
					sbf.append("*D");
					sbf.append((i+1));
				}else{
					sbf.append(signs[index-4]);
					sbf.append((i+1));
					sbf.append("*D");
					sbf.append((i+1));
					sbf.append("+");
				}
			}
			sbf.append(")");
			System.out.println(sbf.toString());
	}
}
